home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1994 November / macformat-018.iso / Utility Spectacular / Developer / Mac F2C 1.0 / Test Project ƒ / test.f < prev   
Encoding:
Text File  |  1994-06-11  |  472 b   |  30 lines  |  [TEXT/KAHL]

  1.     Program temp
  2.     
  3. C--    This is a test FORTRAN program
  4.  
  5.     integer i, j
  6.  
  7.     Real x(100)
  8.     double precision d
  9.  
  10.     do i = 1, 100
  11.         x(i) = float(i)
  12.     end do
  13.  
  14.     write( 6, 100 ) 
  15. 100    format( ' Enter the indice to count to : ', $)
  16.     read( 5, * ) j
  17.  
  18.     do i = 1, j
  19.         d = i
  20.         write( 6, * ) i, x(i), d, i**2, x(i)**2, d**2
  21.     end do
  22.     
  23.     
  24.     pause    '*** End of test output: 3 columns of numbers and then their squares  ***'
  25.  
  26.     write( 6, * ) 'This program completed a normal run'
  27.  
  28.     stop    'End of time'
  29.     end
  30.